namespace EntityKit.Runtime
{
    public abstract class ViewBase<T> : EntityComponent<T> where T : MvcEntity<T>
    {
        protected R GetModel<R>() where R : ModelBase<T>
        {
            return OwnerEntity.GetModel<R>();
        }

        protected R GetView<R>() where R : ViewBase<T>
        {
            return OwnerEntity.GetView<R>();
        }

        protected R GetController<R>() where R : ControllerBase<T>
        {
            return OwnerEntity.GetController<R>();
        }
    }
}